USE [NANS21V]
GO

/****** Object:  StoredProcedure [dbo].[RekidaKirokuGattai]    Script Date: 06/13/2014 13:01:24 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RekidaKirokuGattai]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[RekidaKirokuGattai]
GO

CREATE PROCEDURE [dbo].[RekidaKirokuGattai]
	@TAIKAINO int,
	@KYOGINO int,
	@ROUNDNO int,
	@SUBNO int
AS

	SELECT TG.KYOGINO,
		   TK.KYOGIMEI
	FROM TBL_GATTAI TG,
		 TBL_KYOGI TK
	WHERE TG.TAIKAINO = @TAIKAINO
	AND TG.GATTAINO = @KYOGINO
	AND TG.ROUNDNO = @ROUNDNO
	AND TG.SUBNO = @SUBNO
	AND TG.TAIKAINO = TK.TAIKAINO
	AND TG.KYOGINO = TK.KYOGINO
GO

